package collection;

import java.util.HashMap;
import java.util.Map;

/**
 * 测试hashMap的使用
 */
public class TestMap {
    public static void main(String[] args) {
        Map m1 = new HashMap();

        m1.put("name","张哲");
        m1.put("age",18);
        m1.put("sex","男");
        System.out.println(m1);
        System.out.println(m1.get("sex"));
        System.out.println(m1.size());
        System.out.println(m1.containsKey("name"));
        System.out.println(m1.containsValue(18));
    }
}
